package com.example.lib_image.glide.glide

import android.content.Context
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners

class ImageUtils {
     companion object{
         fun GlideImg(context: Context,url:String,imageView: ImageView){
             Glide.with(context)
                 .load(url)
                 .into(imageView)
         }
         fun GlideCircleImg(context: Context,url:String,imageView: ImageView){
             Glide.with(context)
                 .load(url)
                 .circleCrop()
                 .into(imageView)
         }
         fun GlideCornersImg(context: Context,url:String,flag:Int,imageView: ImageView){
             Glide.with(context)
                 .load(url)
                 .transform(CenterCrop(), RoundedCorners(flag))
                 .into(imageView)
         }
     }
}